package com.smartrobot.main;

import java.util.TimeZone;

import com.smartrobot.conversation.ContainerPool;
import com.smartrobot.robot.GtalkRobot;
import com.smartrobot.robot.GtalkRobotListener;
import com.smartrobot.util.ConvUtil;

public class RobotsMain {

	public static void main(String[] args) {
		// set JVM time zone
		final TimeZone zone = TimeZone.getTimeZone("GMT+8");
        TimeZone.setDefault(zone);
        ConvUtil.getSpringContext();
        ConvUtil.initProp();
       ContainerPool.getPool().init(30);
       
       GtalkRobot gr=new GtalkRobot();
       gr.setListener(new GtalkRobotListener());
       gr.login(); 
       
       Thread thr=new Thread(new Runnable(){
    	   public void run(){
    		   try{
    			   while(true){
    				   Thread.sleep(60000000);  
    			   }
    			   
    		   }catch(Exception e){
    			   e.printStackTrace();
    		   }
    		   
    	   }
       });
		thr.start();
	}

}
